<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--
    window对象中有个属性history  属性值对象
    1. 前进
    2. 后退
-->

<h2>history3</h2>
<button id="back">后退</button>


<script>

    document.getElementById('back').onclick = function () {
        // 后退
        // window.history.back()
        window.history.go(-2)
    }
</script>
</body>
</html>